UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UICvKUWi1nsLN1/U/AeX0G+ExcOMLB79epbqBOTapyI='
WHERE
key_id = '0244f56288075053e59548f60e017acaabc9ad850b98dd85a834b741833e23d7'
AND (
token = 'UICvKUWi1nsLN1/U/AeX0G+ExcOMLB79epbqBOTapyI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)