UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/Of91OBBC1ZOWuvU20TM0Z2xA/UIteHeevjlk/dZldw='
WHERE
key_id = '54d2ea738125271f3f939fda4895d535f4d077bdd4d1051e1122ade08a05389d'
AND (
token = '/Of91OBBC1ZOWuvU20TM0Z2xA/UIteHeevjlk/dZldw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)