UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '07BBdDUGL+ljrFPsz41Iocd6gbJct/ismEIqg/roFsg='
WHERE
key_id = 'f90884770320322f8617daaa9e0de99aafb62aa4a4986b00a1478c41e3512160'
AND (
token = '07BBdDUGL+ljrFPsz41Iocd6gbJct/ismEIqg/roFsg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)