UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm4B09D/CDmv4AvYE58jb8qIq2TDN5Mg5HW1niTyia14='
WHERE
key_id = '630b98359cd0cdabfba63e879c5ca5a545568d10bf23cf98131d767f0c8931e2'
AND (
token = 'm4B09D/CDmv4AvYE58jb8qIq2TDN5Mg5HW1niTyia14='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)