UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EXyFpeSPd+5WY0fPiDFhUo6AOsbbPr1lPKwI4Vg8bRg='
WHERE
key_id = '0a65d1ca2f16e465c0c166fdfe7ad1dfdf09eecef839b5e0fe9a991067d3b338'
AND (
token = 'EXyFpeSPd+5WY0fPiDFhUo6AOsbbPr1lPKwI4Vg8bRg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)