UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'acZOI54bISw/T9y25G0sfeDXAohRF4zE1tyqqcS3dKc='
WHERE
key_id = '27e20cb2936f76bed4582a8c1c6a1f9114cc3d765b1b2dd4971bfbac5925a525'
AND (
token = 'acZOI54bISw/T9y25G0sfeDXAohRF4zE1tyqqcS3dKc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)