UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XMCcBJ3dYx5ChAwXmVuHgijqNR7MD/Rc3L3b68rt+/0='
WHERE
key_id = '0e70251b0e53c2f40da565aa764bc77168a8ca2e8bccba056cd66a6e1089abf9'
AND (
token = 'XMCcBJ3dYx5ChAwXmVuHgijqNR7MD/Rc3L3b68rt+/0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)