UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZxSHuAydirkRpVIjU0fG51YG3D06B6VJzppz8/+Rc2Q='
WHERE
key_id = '5e3567deb058a0e2e213f56456928ddc08143aa7c139032dae9758e6b25b21c0'
AND (
token = 'ZxSHuAydirkRpVIjU0fG51YG3D06B6VJzppz8/+Rc2Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)