UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '55/hXAZa6WrstvYIhgUMYfx44/AuufpKL2/wAOTf2vg='
WHERE
key_id = '2253cdb1eaef031b841a2b6116d5b4f8d8e052948e5543dff75c5b07078d7593'
AND (
token = '55/hXAZa6WrstvYIhgUMYfx44/AuufpKL2/wAOTf2vg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)