UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ui3Q2ql4AJtkY3Uc+PwTehUO4+klIVxGyWbJ01WLwS4='
WHERE
key_id = 'cbfb581013b77885f8c20ef4ffdb678b3e5a63beeb33e63e04baa9ccb3b00d6f'
AND (
token = 'Ui3Q2ql4AJtkY3Uc+PwTehUO4+klIVxGyWbJ01WLwS4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)