UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dXllNaIiZY0SB/tlK4ZlBl25BH040neYXGLqZhiJP5I='
WHERE
key_id = '73c56e8dc61a9744f54c33793d8fea4d86a3bf87391f66595a7747ad70cb1bd0'
AND (
token = 'dXllNaIiZY0SB/tlK4ZlBl25BH040neYXGLqZhiJP5I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)