UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mSR3iuYstQGzThs8GiFONnSzSVj8XBmDSAuWhyS0/MI='
WHERE
key_id = '828e8db6d07d432b57e65d358d4391111bc2f51dbb95c285518a829e1b10ce9b'
AND (
token = 'mSR3iuYstQGzThs8GiFONnSzSVj8XBmDSAuWhyS0/MI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)