UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2jpNACGO3e5O/cRK7nfHyhZoKxg/clHNSu+Qq9QWgnE='
WHERE
key_id = 'eec65e96dec8a24fe68320ceb4864342e94a1416819d53dc7821b0b61cb1b4c6'
AND (
token = '2jpNACGO3e5O/cRK7nfHyhZoKxg/clHNSu+Qq9QWgnE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)