UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9u4oNnzbvJ0ASWFF+ReZo73WjgB5wS4Gv+3gLBBS3fU='
WHERE
key_id = '808b44b15214c1df62076943fa1d60af463570341bd4c88e424ae45b501c1f03'
AND (
token = '9u4oNnzbvJ0ASWFF+ReZo73WjgB5wS4Gv+3gLBBS3fU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)