UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0pJrLmS6gaVtYS+kg8f6GZLOspC2OrwVBoP96i4lIPU='
WHERE
key_id = '6bf1fcb73535b2d2a4161db813c61657d43823f3f31cac25e18d9aa5e0d727e2'
AND (
token = '0pJrLmS6gaVtYS+kg8f6GZLOspC2OrwVBoP96i4lIPU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)