UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7Mo0DtllarVEYK9+WK0TDfVNF8/CUGzI0BSXSbvwOoI='
WHERE
key_id = '4fc76f10152e269b64b1bd88f132474431d447376e29b8c70a852fdcd84c8e3d'
AND (
token = '7Mo0DtllarVEYK9+WK0TDfVNF8/CUGzI0BSXSbvwOoI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)